38 research outputs found
Comprehensive parametric polymorphism : categorical models and type theory
This paper combines reflexive-graph-category structure for relational parametricity with fibrational models of impredicative polymorphism. To achieve this, we modify the definition of fibrational model of impredicative polymorphism by adding one further ingredient to the structure: comprehension in the sense of Lawvere. Our main result is that such comprehensive models, once further endowed with reflexive-graph-category structure, enjoy the expected consequences of parametricity. This is proved using a type-theoretic presentation of the category-theoretic structure, within which the desired consequences of parametricity are derived. The formalisation requires new techniques because equality relations are not available, and standard arguments that exploit equality need to be reworked
Proof-relevant parametricity
Parametricity is one of the foundational principles which underpin our understanding of modern programming languages. Roughly speaking, parametricity expresses the hidden invariants that programs satisfy by formalising the intuition that programs map related inputs to related outputs. Traditionally parametricity is formulated with proofirrelevant relations but programming in Type Theory requires an extension to proof-relevant relations. But then one might ask: can our proofs that polymorphic functions are parametric be parametric themselves? This paper shows how this can be done and, excitingly, our answer requires a trip into the world of higher dimensional parametricity
Connecting Constructive Notions of Ordinals in Homotopy Type Theory
In classical set theory, there are many equivalent ways to introduce ordinals. In a constructive setting, however, the different notions split apart, with different advantages and disadvantages for each. We consider three different notions of ordinals in homotopy type theory, and show how they relate to each other: A notation system based on Cantor normal forms, a refined notion of Brouwer trees (inductively generated by zero, successor and countable limits), and wellfounded extensional orders. For Cantor normal forms, most properties are decidable, whereas for wellfounded extensional transitive orders, most are undecidable. Formulations for Brouwer trees are usually partially decidable. We demonstrate that all three notions have properties expected of ordinals: their order relations, although defined differently in each case, are all extensional and wellfounded, and the usual arithmetic operations can be defined in each case. We connect these notions by constructing structure preserving embeddings of Cantor normal forms into Brouwer trees, and of these in turn into wellfounded extensional orders. We have formalised most of our results in cubical Agda
Quantitative polynomial functors
Data types are the basic building blocks of modern type theories and programming languages. Having more powerful data types around can increase the proof-theoretic strength of the theory, i.e., allow more programs to be written, and can also make existing proofs/programs more convenient to write. Recent advances in type theories such as cubical type theory have also been accompanied by advances in data type theory, such as quotient and higher inductive types. In this paper, we explore what a corresponding notion of (non-higher, so far) inductive types for the also recently introduced type theory Quantitative Type Theory (QTT) might be. QTT combines dependent types and linear types, in the sense of linear logic. By using linearity to track variable (and hence resource) usage of programs, QTT thus promises to enable formal reasoning about both functional and non-functional correctness of programs. A variant of QTT is implemented in the Idris 2 programming language, and we hope that our work can be used as a foundational justification for the implementation of data types there. Conversely, we have used Idris 2 to mechanically verify parts of our development
Responsible Composition and Optimization of Integration Processes under Correctness Preserving Guarantees
Enterprise Application Integration deals with the problem of connecting
heterogeneous applications, and is the centerpiece of current on-premise, cloud
and device integration scenarios. For integration scenarios, structurally
correct composition of patterns into processes and improvements of integration
processes are crucial. In order to achieve this, we formalize compositions of
integration patterns based on their characteristics, and describe optimization
strategies that help to reduce the model complexity, and improve the process
execution efficiency using design time techniques. Using the formalism of timed
DB-nets - a refinement of Petri nets - we model integration logic features such
as control- and data flow, transactional data storage, compensation and
exception handling, and time aspects that are present in reoccurring solutions
as separate integration patterns. We then propose a realization of optimization
strategies using graph rewriting, and prove that the optimizations we consider
preserve both structural and functional correctness. We evaluate the
improvements on a real-world catalog of pattern compositions, containing over
900 integration processes, and illustrate the correctness properties in case
studies based on two of these processes.Comment: 37 page
Type systems for programs respecting dimensions
Type systems can be used for tracking dimensional consistency of numerical computations: we present an extension from dimensions of scalar quantities to dimensions of vectors and matrices, making use of dependent types from programming language theory. We show that our types are unique, and most general. We further show that we can give straightforward dimensioned types to many common matrix operations such as addition, multiplication, determinants, traces, and fundamental row operations
Variations on Inductive-Recursive Definitions
Dybjer and Setzer introduced the definitional principle of inductive-recursively defined families - i.e. of families (U : Set, T : U -> D) such that the inductive definition of U may depend on the recursively defined T --- by defining a type DS D E of codes. Each c : DS D E defines a functor [c] : Fam D -> Fam E, and
(U, T) = mu [c] : Fam D is exhibited as the initial algebra of [c].
This paper considers the composition of DS-definable functors: Given F : Fam C -> Fam D and G : Fam D -> Fam E, is G circ F : Fam C -> Fam E DS-definable, if F and G are? We show that this is the case if and only if powers of families are DS-definable, which seems unlikely. To construct composition, we present two new systems UF and PN of codes for inductive-recursive definitions, with UF a subsytem of DS a subsystem of PN. Both UF and PN are closed under composition. Since PN defines a potentially larger class of functors, we show that there is a model where initial algebras of PN-functors exist by adapting Dybjer-Setzer\u27s proof for DS